<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="./docs-assets/ico/favicon.png">

	<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
    <script src="./js/underscore-1.1.6.js"></script>
	<script src="http://www.parsecdn.com/js/parse-1.2.15.min.js"></script>
	<script src="./js/logInInfo.js"></script>
	

	
	

    <title>UPMContact - Bienvenue !</title>

    <!-- Bootstrap core CSS -->
    <link href="./dist/css/bootstrap.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="./dist/css/signin.css" rel="stylesheet">

    <!-- Just for debugging purposes. Don't actually copy this line! -->
    <!--[if lt IE 9]><script src="../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>

      <div id="user-info" hidden>
        Enregistré comme  <span id="us"> </span>
		<a href="#" class="log-out">Déconnexion</a>
      </div>
	  
    <div class="container">

      <div class="form-signin" role="form">
        <h2 class="form-signin-heading">Authentification</h2>
		<input type="text" id="login-username" class="form-control" placeholder="Username" required autofocus>
        <input type="password" id="login-password" class="form-control" placeholder="Password" required>
        <button id="login" class="btn btn-lg btn-primary btn-block" >Connexion</button>
		
		 <a href="pages/sign-in.html" ><button id="login" class="btn btn-lg btn-primary btn-block"  >Se créer un compte</button></a>
      </div>
	
	<!-- <div style = "text-align:center;" id="redirect" hidden>
		<p>
			<h1>REDIRECTION DANS 3 SECONDES !</h1>
		</p>
	</div> -->
    </div> <!-- /container -->
	
<script>
				$( document ).ready(function() {
	$( document ).ready(function() {
		Parse.$ = jQuery;
		Parse.initialize("lken7qlOOU6DnGkQddYiIIVTTGBVGt8cHsTh0mN6", "lVOSFDfYALex78xE7WdpLadiZl61hUe1VrbnLA73");

		if (Parse.User.current()) {

					
					var account = Parse.User.current().get("account");
					
					  if (account === "admin")
					  {
							
							window.setTimeout("location=('./pages/adminupmc.html');",0000);
						}
					  else if (account === "bde")
					  {
						window.setTimeout("location=('./pages/bde.html');",0000);
					}
					  else if (account === "commercant")
					  {
						window.setTimeout("location=('./pages/commerce.html');",0000);
					}
					  else{
						  //alert("type de compte non reconnu");
					  }
					}
			    
				
	});
	});


</script>
	
					
	
	
	
    <!-- Bootstrap core JavaScript
	<script src="../js/jquery-2.0.3.js"></script>
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
  </body>
</html>
